﻿
using System;
using System.Linq;
using System.Linq.Expressions;

namespace GH.Common.Framework.Persistence
{
    public interface IPersistence<T>
    {
        void Insert(T entity, bool commit);
        void Update(T entity, bool commit);
        void Delete(T entity, bool commit);
        void Commit();
        IQueryable<T> SearchBy(Expression<Func<T, bool>> predicate);
        IQueryable<T> GetAll();
    }
}